
			let $tbody2 = $("#mytable2").find("tbody");
			let $tbody = $("#mytable1").find("tbody");
			let $tbody3 = $("#mytable3").find("tbody");
			let $tbody4 = $("#mytable4").find("tbody");
			let c,h,i,n,a,b,key2,key2_2,key2_3,pages;
			let key;
			let id_hone = [];
			//当前登入用户
			let user_name = JSON.parse(localStorage.getItem("user_name"));
			$(".user_name").text(user_name.user);
			//当前登入用户密码
			let user_psd = user_name.psd;
			//拿到所有系统管理员的账号密码数据
			let manager_data = JSON.parse(localStorage.getItem("manager"))
			for(let index in manager_data){
				let item = manager_data[index];
				if(item.user === user_name.user&&item.psd === user_name.psd){
					b = index;
					break;
				}
				continue;
			}
			let arr_manage=
			[
				{id:1,name:'老王',sex:'女',phone:'123456',lou:'E1',user:'老王'},
				{id:2,name:'白百合',sex:'男',phone:'123456',lou:'E2',user:'白百合'},
				{id:3,name:'刘岩',sex:'男',phone:'123456',lou:'E3',user:'刘岩'},
				{id:4,name:'阿斯顿',sex:'女',phone:'123456',lou:'E4',user:'阿斯顿'},
				{id:5,name:'老马',sex:'女',phone:'123456',lou:'E5',user:'老马'}
			]
			//判断数组是否有更新
			let arr_managedata = JSON.parse(localStorage.getItem("arr_manage"));
			if(arr_managedata !== null){
				arr_manage = arr_managedata;
				localStorage.setItem("sign_manager",JSON.stringify(arr_manage));
			}else{
				localStorage.setItem("sign_manager",JSON.stringify(arr_manage));
				arr_manage = arr_manage;
			}
			let arr_stu=
			[
				{id:1,name:'小红',sex:'女',phone:'123456',lou:'E1',room:'812'},
				{id:2,name:'泰坦',sex:'男',phone:'123456',lou:'E1',room:'811'},
				{id:3,name:'哥斯拉',sex:'男',phone:'123456',lou:'E1',room:'822'},
				{id:4,name:'魔斯拉',sex:'女',phone:'123456',lou:'E2',room:'812'},
				{id:5,name:'宝马',sex:'女',phone:'123456',lou:'E2',room:'824'}
			]
			//判断数组是否有更新
			let arr_studata = JSON.parse(localStorage.getItem("arr_stu"));
			if(arr_studata !== null){
				arr_stu = arr_studata;
				localStorage.setItem("sign_stu",JSON.stringify(arr_stu));
			}else{
				arr_stu = arr_stu;
				localStorage.setItem("sign_stu",JSON.stringify(arr_stu));
			}
			localStorage.setItem("arr_stu",JSON.stringify(arr_stu))
			let arr_su=
			[
				{id:1,name:'E1',infor:'老王',manager:'老王'},
				{id:2,name:'E2',infor:'白百合',manager:'白百合'},
				{id:3,name:'E3',infor:'刘岩',manager:'刘岩'},
				{id:4,name:'E4',infor:'阿斯顿',manager:'阿斯顿'},
				{id:5,name:'E5',infor:'老马',manager:"老马"}
			]
			//判断数组是否有更新
			let arr_sudata = JSON.parse(localStorage.getItem("arr_su"));
			if(arr_sudata !== null){
				arr_su = arr_sudata;
			}else{
				arr_su = arr_su;
			}
			let arr_node=
			[
				{date:"2010-01-02",id:1,name:'小红',lou:'E1',room:'812',beizhu:"迟到"},
				{date:"2017-11-02",id:2,name:'哥斯拉',lou:'E1',room:'822',beizhu:"旷课"},
				{date:"2020-05-02",id:3,name:'小红',lou:'E1',room:'812',beizhu:"早退"},
				{date:"2020-02-26",id:4,name:'魔斯拉',lou:'E2',room:'812',beizhu:"迟到"},
				{date:"2008-11-02",id:5,name:'宝马',lou:'E2',room:'824',beizhu:"早退"}
			]
			// 判断数组是否有更新
			let arr_nodedata = JSON.parse(localStorage.getItem("arr_node"));
			if(arr_nodedata !== null){
				arr_node = arr_nodedata;
				localStorage.setItem("arr_node",JSON.stringify(arr_node));
			}else{
				localStorage.setItem("arr_node",JSON.stringify(arr_node));
			}
			let index_hide = JSON.parse(localStorage.getItem("index_hide"));
			let index_show = JSON.parse(localStorage.getItem("index_show"));
			if(index_show){
				console.log(index_show)
			}
			//分页功能
			limit();
			function limit(){
				$("#right").click(function(){
					let name ="su";
					update(name);
					$tbody.find("tr").hide();
					for(let index in index_hide){
						$tbody.find("tr:eq("+index_hide[index]+")").show();
					}
					pages = 1;
				})
			}
			$("#left").click(function(){
				if(pages === 1){
					$tbody.find("tr").hide();
					for(let index in index_show){
					$tbody.find("tr:eq("+index_show[index]+")").show();
					}
				}
			})
			// 搜索val()
			$("input[name='search_All']").click(function(){
				if($("input[name='search_down']").val() === ""){
					alert("请输入数据")
					return;
				}
				console.log(key);
				let index_data = [];
				let i;
				let name = [];
				let value = $("input[name='search_down']").val();
				for(let index in arr_manage){
					let item = arr_manage[index];
					name.push(item.name);
				}
				if(key === 1){
					for(let index in name){
						let item = name[index];
						let data = arr_manage[index];
						if(item.indexOf(value) !==-1){
						$tbody.find("tr").hide();
						$tbody.find("tr:eq("+index+")").show();
						break;
						}else if(arr_manage[index].sex === value){
							index_data.push(index);
								$tbody.find("tr").hide();
							continue;
							i++;
						}
					}
					for(let index in index_data){
						index = index_data[index];
						$tbody.find("tr:eq("+index+")").show();
					}
				}else if(key === 2){
					console.log("222")
					$tbody2.find("tr").hide();
					for(let index in arr_stu){
						item = arr_stu[index];
						if(item.lou === value){
							$tbody2.find("tr:eq("+index+")").show();
						}
					}
				}else if(key === 3){
					
				}else if(key === 4){
					
				}else if(key === 5){
					
				}
				$("#search_down").val("");
			})
			//批量删除
			$("input[name='row_del']").click(function(){
				if(confirm("确定要删除吗？")){
					$("input[name='check']:checked").parent().parent().remove();
				}
					
			})
			//全选
			$("input[name='checkAll1']").click(function(){
				let che = $(this);
				$("input[name='check']").prop("checked",che.prop("checked"));
			})
			//宿管员搜索名字
			for(let index in arr_manage){
				let item = arr_manage[index];
				$("#ul").append(`<li ><a href="#">${item.name}</a></li>`);
				$("#add_a").append(`<li ><a href="#">${item.name}</a></li>`);
			}
			//下拉框选择的时候给搜索框赋值
			$("#ul").find("a").click(function(){
				$("input[name='search_down']").val($(this).text());
			})
			//模态框管理员选择
			$("#add_a").find("a").click(function(){
					$("#addi").val($(this).text());
			})
			//搜索全部宿舍
			$("#all_Su").find("a").click(function(){
				$("input[name='search_down']").val($(this).text());
			})
			//全部宿舍
			for(let index in arr_stu){
				let item = arr_stu[index];
				$("#all_Su").append(`<li ><a href="#">${item.lou}</a></li>`);
			}
			$("#all_Su").find("a").click(function(){
				all_Stu = JSON.parse(localStorage.getItem("sign_stu"));
				$("#ul").find("a").hide();
				$("input[name='search_down']").val($(this).text());
				let data = $("input[name='search_down']").val();
				for(let index in all_Stu){
					let item = all_Stu[index];
					if(item.lou === data){
						$("#ul").append(`<li ><a href="#">${item.name}</a></li>`);
					}
				}
			})
			//显示记录
			function code(){
				$("#code").text("显示1至"+arr_stu.length+"条记录")
			}
			//编辑保存按钮
			$("button[name='modal_save']").click(function(){
				//模态框
				if(key2 !== ""){
					let sex_edit = $("select[name='sex']").val();
					let editmodal_name = $("input[name='modal_name']").val();
					let editmodal_phone = $("input[name='modal_phone']").val();
					let editmodal_lou = $("input[name='modal_lou']").val();
					let editmodal_user = $("input[name='modal_user']").val();
					let new_editsu =
					{
						id:parseInt(key2)+1,
						name:editmodal_name,
						sex:sex_edit,
						phone:editmodal_phone,
						lou:editmodal_lou,
						user:editmodal_user,
					};
					arr_manage.splice(key2,1,new_editsu);
					localStorage.setItem("arr_manage",JSON.stringify(arr_manage));
					$tbody.empty();
					let name ="su";
					update(name);
				}else if(key2_2 !== ""){
					let sex2 = $("select[name='sex2']").val();
					let modal_sname = $("input[name='modal_sname']").val();
					let modal_sphone = $("input[name='modal_sphone']").val();
					let modal_slou = $("input[name='modal_slou']").val();
					let modal_sroom = $("input[name='modal_sroom']").val();
					let news_editsu =
					{
						id:parseInt(key2_2)+1,
						name:modal_sname,
						sex:sex2,
						phone:modal_sphone,
						lou:modal_slou,
						room:modal_sroom,
					};
					arr_stu.splice(key2_2,1,news_editsu);
					localStorage.setItem("arr_stu",JSON.stringify(arr_stu));
					$tbody2.empty();
					let name ="stu";
					update(name);
				}else if(key2_3 !== ""){
					let modal_suname = $("input[name='modal_suname']").val();
					let modal_suphone = $("input[name='modal_suphone']").val();
					let addi = $("#addi").val();
					let news_editsu =
					{
						id:parseInt(key2_3)+1,
						name:modal_suname,
						infor:modal_suphone,
						manager:addi,
					};
					arr_su.splice(key2_3,1,news_editsu);
					console.log(arr_su)
					localStorage.setItem("arr_su",JSON.stringify(arr_su));
					$tbody3.empty();
					let name ="lou";
					update(name);
				}else if(key2_4 !== ""){
					let modal_bqueData = $("input[name='modal_bqueData']").val();
					let modal_bqueNO = $("input[name='modal_bqueNO']").val();
					let modal_bquename = $("input[name='modal_bquename']").val();
					let modal_bquelou = $("input[name='modal_bquelou']").val();
					let modal_bqueroom = $("input[name='modal_bqueroom']").val();
					let modal_bquebeizhu = $("input[name='modal_bquebeizhu']").val();
					let new_node =
					{
						date:modal_bqueData,
						id:modal_bqueNO,
						name:modal_bquename,
						lou:modal_bquelou,
						room:modal_bqueroom,
						beizhu:modal_bquebeizhu
					};
					arr_node.splice(key2_4,1,new_node);
					console.log(arr_node)
					localStorage.setItem("arr_node",JSON.stringify(arr_node));
					$tbody4.empty();
					let name ="bad_node";
					update(name);
				}
			})
			//编辑按钮mytable1
			function su_edit(index){
				$("#add_sy").text("编辑宿舍管理员");
				$("#modal_co").css("display","none");
				$("#modal_save").css("display","");
				let item =arr_manage[index];
				$("input[name='modal_name']").val(item.name);
				$("input[name='modal_phone']").val(item.phone);
				$("input[name='modal_lou']").val(item.lou);
				$("input[name='modal_user']").val(item.user);
				if(item.sex === "男"){
					$("#select").text("男");
					$("#select1").hide();
					$("#select2").show();
				}else{
					$("#select").text("女");
					$("#select1").show();
					$("#select2").hide();
				}
				key2 = index;
				return key2;
			}
			// //编辑按钮mytable2
			function stu_edit(index){
				$("#modal_co2").css("display","none");
				$("#modal_save2").css("display","");
				let item =arr_stu[index];
				$("input[name='modal_sname']").val(item.name);
				$("input[name='modal_sphone']").val(item.phone);
				$("input[name='modal_slou']").val(item.lou);
				$("input[name='modal_sroom']").val(item.room);
				if(item.sex === "男"){
					$("option[name='sex2_1']").text("男");
					$("option[name='sex2_2']").text("女");
				}else{
					$("option[name='sex2_1']").text("女");
					$("option[name='sex2_2']").text("男");
				}
				key2_2 = index;
				key2 = "";
				return key2_2,key2;
			}
			//编辑按钮mytable3
			function lou_edit(index){
				$("#asd").show();
				$("#modal_co3").css("display","none");
				$("#das").css("display","none");
				$("#modal_save3").css("display","");
				let item =arr_su[index];
				$("input[name='modal_suname']").val(item.name);
				$("input[name='modal_suphone']").val(item.infor);
				$("#addi").val(arr_manage[index].name);
				key2_3 = index;
				key2_2 = "";
				key2 = "";
			}
			//编辑按钮mytable4
			function bad_edit(index){
				$("#modal_co4").css("display","none");
				$("#modal_save4").css("display","");
				let item =arr_node[index];
				console.log(item.id)
				$("input[name='modal_bqueData']").val(item.date);
				$("input[name='modal_bqueNO']").val(item.id);
				$("input[name='modal_bquename']").val(item.name);
				$("input[name='modal_bquelou']").val(item.lou);
				$("input[name='modal_bqueroom']").val(item.room);
				$("input[name='modal_bquebeizhu']").val(item.beizhu);
				key2_4 = index;
				key2_3 = "";
				key2_2 = "";
				key2 = "";
			}
			
			//添加按钮
			function modal_click(){
				$("#myModal").find("input").val("");
				$("div[name='emt']").find("input").val("");
				$("#modal_save").css("display","none");
				$("#modal_save2").css("display","none");
				$("#modal_save3").css("display","none");
				$("#modal_save4").css("display","none");
				$("#asd").css("display","none");
				$("#modal_co").show();
				$("#modal_co3").show();
				$("#das").show();
				if(key === 1){
					$("#btn_modclick").attr("data-target","#myModal");
				}else if(key === 2){
					$("#btn_modclick").attr("data-target","#myModal2");
				}else if(key === 3){
					$("#btn_modclick").attr("data-target","#myModal3");
				}else if(key === 4){
					$("#btn_modclick").attr("data-target","#myModal4");
				}
			}
			//添加保存模态框按钮
			$("button[name='modal_cr']").click(function(){
				// 模态框一
				let sex = $("select[name='sex']").val();
				let modal_name = $("input[name='modal_name']").val();
				let modal_phone = $("input[name='modal_phone']").val();
				let modal_lou = $("input[name='modal_lou']").val();
				let modal_user = $("input[name='modal_user']").val();
				// 模态框二
				let modal_sname = $("input[name='modal_sname']").val();
				let _sex = $("#sex2_2 option:selected").text();
				let modal_sp = $("input[name='modal_sphone']").val();
				let modal_sl = $("input[name='modal_slou']").val();
				let modal_sr = $("input[name='modal_sroom']").val();
				// 模态框三
				let modal_suname = $("input[name='modal_suname']").val();
				let modal_suphone = $("input[name='modal_suphone']").val();
				let addi2 = $("#addi2").val();
				// 模态框四
				let modal_bqueData = $("input[name='modal_bqueData']").val();
				let modal_bqueNO = $("input[name='modal_bqueNO']").val();
				let modal_bquename = $("input[name='modal_bquename']").val();
				let modal_bquelou = $("input[name='modal_bquelou']").val();
				let modal_bqueroom = $("input[name='modal_bqueroom']").val();
				let modal_bquebeizhu = $("input[name='modal_bquebeizhu']").val();
				//添加宿舍管理员
				let new_manager =
				{
					id:arr_manage.length+1,
					name:modal_name,
					sex:sex,
					phone:modal_phone,
					lou:modal_lou,
					user:modal_user,
				}
				//添加学生
				let newarr_stu =
				{
					id:arr_stu.length+1,
					name:modal_sname,
					sex:_sex,
					phone:modal_sp,
					lou:modal_sl,
					room:modal_sr,
				}
				//添加宿舍楼管理
				let newarr_su =
				{
					id:arr_su.length+1,
					name:modal_suname,
					infor:modal_suphone,
					manager:addi2,
				}
				console.log("111")
				let newarr_node =
				{
					date:modal_bqueData,
					id:arr_node.length+1,
					SNO:modal_bqueNO,
					name:modal_bquename,
					lou:modal_bquelou,
					room:modal_bqueroom,
					beizhu:modal_bquebeizhu,
				}
				 if(key === 1){
					 if(new_manager.name === ""){
					 	alert("名字不能为空");
						return;
					 }
					console.log(111);
					arr_manage.push(new_manager);
					localStorage.setItem("arr_manage",JSON.stringify(arr_manage));
					$tbody.empty();
					let name ="su";
					update(name);
				}else if(key === 2){
					if(newarr_stu.name === ""){
						alert("名字不能为空");
						return;
					}
					arr_stu.push(newarr_stu);
					localStorage.setItem("arr_stu",JSON.stringify(arr_stu));
					$tbody2.empty();
					let name ="stu";
					update(name);
					code();
				}else if(key === 3){
					if(newarr_su.name === ""){
						alert("名字不能为空");
						return;
					}
					arr_su.push(newarr_su);
					localStorage.setItem("arr_su",JSON.stringify(arr_su));
					$tbody3.empty();
					let name ="lou";
					update(name);
				}
				else if(key === 4){
					if(newarr_node.name === ""){
						alert("名字不能为空");
						return;
					}
					arr_node.push(newarr_node);
					localStorage.setItem("arr_node",JSON.stringify(arr_node));
					$tbody4.empty();
					let name ="bad_node";
					update(name);
				}
			})
			//删除按钮mytable1
			function su_del(index){
				if(confirm("确定要删除吗？")){
					arr_manage.splice(index,1);
					localStorage.setItem("arr_manage",JSON.stringify(arr_manage));
					$tbody.empty();
					let name ="su";
					update(name);
				}
			}
			//删除按钮mytable2
			function stu_del(index){
				if(confirm("确定要删除吗？")){
					arr_stu.splice(index,1);
					localStorage.setItem("arr_stu",JSON.stringify(arr_stu));
					$tbody2.empty();
					let name ="stu";
					update(name);
					code();
				}
			}
			//删除按钮mytable3
			function lou_del(index){
				if(confirm("确定要删除吗？")){
					arr_su.splice(index,1);
					localStorage.setItem("arr_su",JSON.stringify(arr_su));
					$tbody3.empty();
					let name ="lou";
					update(name);
				}
			}
			//删除按钮mytable4
			function bad_del(index){
				if(confirm("确定要删除吗？")){
					arr_node.splice(index,1);
					localStorage.setItem("arr_node",JSON.stringify(arr_node));
					$tbody4.empty();
					let name ="bad_node";
					update(name);
				}
			}
			//改密码
			$("input[name='psd_save']").click(function(){
				let old_psd = $("input[name='old_psd']").val();
				let new_psd = $("input[name='new_psd']").val();
				let c_psd = $("input[name='c_psd']").val();
				let new_manager =
				{
					user:user_name.user,
					psd:c_psd,
				}
				if(old_psd !== user_psd){
					alert("密码不正确");
					return false;
				}else if(new_psd === user_psd){
					alert("新密码不能和原密码相同");
					return false;
				}else if (c_psd !== new_psd){
					alert("两次输入的密码不正确");
					return false;
				}
				manager_data.splice(b,1,new_manager);
				console.log(manager_data);
				localStorage.setItem("new_user",JSON.stringify(manager_data));
				alert("修改成功，请重新登入");
				window.location.href="login.html";
			})
			//管理员管理
			function su(){
				$("#search_down").val("");
				key = 1;
				if(c!==1){
					let name ="su";
					update(name);
					$("h1").slideUp();
					$("#mytable2").hide();
					$("#mytable3").hide();
					$("#mytable4").hide();
					$("#edit_psd").hide();
					$("#all_su").hide();
					$("#code").hide();
					$("#mytable1").show();
					// $(".box").find("table").slideDown();
					$("#btn").show();
					$("#pager").show();
				}else{
					$("#mytable2").hide();
					$("#mytable3").hide();
					$("#mytable4").hide();
					$("#edit_psd").hide();
					$("#mytable1").show();
					$("#pager").show();
					$("#all_su").hide();
					$("#code").hide();
				}
					return c = 1;
			}
			//学生管理
			function stu(){
				$("#search_down").val("");
				$("#ul").find("li").hide();
					for(let index in arr_stu){
						let item = arr_stu[index];
						$("#ul").append(`<li><a>${item.name}</a></li>`);
					}
				key = 2;
					if(h!==1){
						let name ="stu";
						update(name);
						$("h1").slideUp();
						$("#mytable1").hide();
						$("#mytable3").hide();
						$("#mytable4").hide();
						$("#edit_psd").hide();
						$("#mytable2").show();
						$("#all_su").show();
						$("#code").show();
						// $(".box").find("table").slideDown();
						$("#btn").show();
						$("#pager").hide();
					}else{
						$("#mytable1").hide();
						$("#mytable3").hide();
						$("#mytable4").hide();
						$("#edit_psd").hide();
						$("#mytable2").show();
						$("#all_su").show();
						$("#pager").hide();
						$("#code").show();
					}
						
						return h = 1;
						code();
			}
			//宿舍楼管理
			function manage_L(){
				$("#search_down").val("");
				key = 3;
				if(i!==1){
					let name ="lou";
					update(name);
					$("h1").slideUp();
					$("#mytable2").hide();
					$("#mytable1").hide();
					$("#mytable4").hide();
					$("#edit_psd").hide();
					$("#mytable3").show();
					$("#all_su").hide();
					$("#code").hide();
					// $(".box").find("table").slideDown();
					$("#btn").show();
					$("#pager").show();
				}else{
					$("#mytable1").hide();
					$("#mytable2").hide();
					$("#mytable4").hide();
					$("#edit_psd").hide();
					$("#mytable3").show();
					$("#pager").show();
					$("#all_su").hide();
					$("#code").hide();
				}
					
					return i = 1;
			}
			//缺勤记录
			function bad_node(){
				$("#search_down").val("");
				key = 4;
				if(n!==1){
					let name ="bad_node";
					update(name);
					$("h1").slideUp();
					$("#mytable2").hide();
					$("#mytable3").hide();
					$("#mytable1").hide();
					$("#edit_psd").hide();
					$("#mytable4").show();
					$("#pager").hide();
					$("#all_su").hide();
					$("#code").hide();
					// $(".box").find("table").slideDown();
					$("#btn").show();
				}else{
					$("#mytable1").hide();
					$("#mytable2").hide();
					$("#mytable3").hide();
					$("#edit_psd").hide();
					$("#mytable4").show();
					$("#pager").hide();
					$("#all_su").hide();
					$("#code").hide();
				}
					
					return n = 1;
			}
			//修改密码
			function edit_psd(){
				$("#btn").hide();
				$("#pager").hide();
				$("#mytable1").hide();
				$("#mytable2").hide();
				$("#mytable3").hide();
				$("#mytable4").hide();
				$("#all_su").hide();
				$("#code").hide();
				$("h1").slideUp();
				$("#edit_psd").show();
			}
			//退出系统
			function exit(){
				window.location.href="login.html";
			}
			//表格数据
			function update(name){
				let index_hide=[];
				let index_show=[];
				let key1_data = JSON.parse(sessionStorage.getItem("key1"));
				if(key1_data){
					arr_manage = key1_data;
				}
				// let idd = [];
				// for(let index2 in arr_manage){
				// 	let index3 = parseInt(index2) + 1;
				// 	let aid = arr_manage[index2].id;
				// 	let aid2 = arr_manage[index3].id;
				// 	if(aid+1 !== aid2){
				// 		aid2 = aid+1;
				// 		idd.push(aid2);
				// 		console.log(idd);
				// 	}
				// }
				if(name ==="su"){
					let id_hone = JSON.parse(localStorage.getItem("id_hone"));
					for(index in arr_manage){
						let item = arr_manage[index];
						let tr =
						`
						<tr>
						<td><input type="checkbox" name="check"/></td>
						<td>${item.id}</td>
						<td>${item.name}</td>
						<td>${item.sex}</td>
						<td>${item.phone}</td>
						<td>${item.lou}</td>
						<td>${item.user}</td>
						<td>
						<button class="btn btn-info" onclick="su_edit(${index})" class="btn btn-success" " data-toggle="modal" data-target="#myModal">修改</button>
						<button class="btn btn-danger" onclick="su_del(${index})">删除</button>
						</td>
						</tr>
						`;
						$tbody.append(tr);
						if(index <= 4){
							index_show.push(index);
						}
						if(index>4){
							$tbody.find("tr:eq("+index+")").hide();
							index_hide.push(index);
						}
					}
					localStorage.setItem("index_hide",JSON.stringify(index_hide));
					localStorage.setItem("index_show",JSON.stringify(index_show));
				}else if(name==="stu"){
						for(index in arr_stu){
							let item = arr_stu[index]
							let tr =
							`
							<tr>
							<td><input type="checkbox" name="check" /></td>
							<td>${item.id}</td>
							<td>${item.name}</td>
							<td>${item.sex}</td>
							<td>${item.phone}</td>
							<td>${item.lou}</td>
							<td>${item.room}</td>
							<td>
							<button class="btn btn-info" onclick="stu_edit(${index})" class="btn btn-success" " data-toggle="modal" data-target="#myModal2">修改</button>
							<button class="btn btn-danger" onclick="stu_del(${index})">删除</button>
							</td>
							</tr>
							`;
							$tbody2.append(tr);
						}
					}else if(name==="lou"){
						for(index in arr_su){
							let item = arr_su[index]
								let tr =
								`
								<tr>
								<td><input type="checkbox" name="check" /></td>
								<td>${item.id}</td>index
								<td>${item.name}</td>
								<td>${item.infor}</td>
								<td>${item.manager}</td>
								<td>
								<button class="btn btn-info" onclick="lou_edit(${index})" class="btn btn-success" " data-toggle="modal" data-target="#myModal3">修改</button>
								<button class="btn btn-danger" onclick="lou_del(${index})">删除</button>
								</td>
								</tr>
								`;
								$tbody3.append(tr);
						}
					}
					else if(name==="bad_node"){
						for(index in arr_node){
							let item = arr_node[index]
							let tr =
							`
							<tr>
							<td><input type="checkbox" name="check" /></td>
							<td>${item.date}</td>
							<td>${item.id}</td>
							<td>${item.name}</td>
							<td>${item.lou}</td>
							<td>${item.room}</td>
							<td>${item.beizhu}</td>
							<td>
							<button class="btn btn-info" onclick="bad_edit(${index})" class="btn btn-success" " data-toggle="modal" data-target="#myModal4">修改</button>
							<button class="btn btn-danger" onclick="bad_del(${index})">删除</button>
							</td>
							</tr>
							`;
							$tbody4.append(tr);
						}
					}
				
			}
			update();
			code();